package com.sl.au.service;

import java.util.List;
import java.util.Map;

import com.sl.au.entity.BussinessLevel;
import com.sl.au.entity.Hierarchy;
import com.sl.au.entity.HierarchyForMailList;
import com.sl.au.repository.HierarchyRepository;

public interface HierarchyService extends BaseService {
	HierarchyRepository getRepository();
	/**
	 * 转换树结构
	 * @param node
	 * @return
	 */
	List<Map<String, Object>> getNodeMap(List<Hierarchy> node);
	
	public List<Hierarchy> getAllNodes();
	
	/*********** 获取未绑定节点 *************/
	
	List<Hierarchy> getHierarchyByKey(int start, int length, String key, String orderName, String dir);
	
	int getHierarchyByKeyCount(String key);

	/************ 获取子节点 ************/
	
	List<Hierarchy> getChildrenHierarchyByKey(int start, int length, String id, String key, String orderName, String dir);
	
	int getChildrenHierarchyByKeyCount(String id, String key);
	
	/**********************************/
	/*************** 获取下级节点 ***************/
	List<Map<String, Object>> getNextNode(String id);
	/**
	 * 删除节点
	 *
	 * @param ids
	 * @return
	 */
	void deleteNodes(String[] ids);
	
	void setHierarchyOrder(String groupParent);
	
	String getHierarchyIdentify(String id);

	List<Hierarchy> findByParentId(String parentId);
	
	/************ 通讯录查看下级 ************/
	List<HierarchyForMailList> findHierarchyForMailList(String parentId);

	List<HierarchyForMailList> findHierarchyForMailListByKey(String Key);
	
	
}
